#include <gtk/gtk.h>
#include <stdio.h>

#include "gtkutils.h"

createSignalFunc(sayHello) {
    printf("hello word\n");
}

static void activate(GtkApplication *app, gpointer user_data) {
    GtkWindow *window;

    window = createWindowWithTitleSize(app, "gtk-helloworld-in-c", 200, 100);

    setWindowChild(window, 
        createBoxWithHorizntalAppends(0, 
            createButtonAction(NULL, "Hello World", sayHello),
            NULL
        )
    );
    showWindow(window);
}

int	main(int argc, char **argv) {

    GtkApplication *app;
    int status;

    app = createApplicationConnectActivate("gtk.example.helloworld", 
                                G_APPLICATION_FLAGS_NONE, activate);
    status = runApplication(app, argc, argv);
    objectUnref(app);

    return status;
}

